function hideshow(aEvent)
{
	var e = aEvent ? aEvent : window.event;
	var id = document.getElementById(e.target.id);
	var nextSibling = id.nextSibling;
	while (nextSibling && nextSibling.nodeType != 1)
	{
		nextSibling = nextSibling.nextSibling;
	}
	if (nextSibling.style.visibility == "visible")
	{
		nextSibling.style.visibility="hidden";
		nextSibling.style.position="absolute";
	}
	else
	{
		nextSibling.style.position="relative";
		nextSibling.style.visibility="visible";
	}

    /* Adapt the main frame height to the frame */
    var main = document.getElementsByClassName('main')[1];
    var lframe = document.getElementById('leftManagement');
    var rframe = document.getElementById('rightManagement');
    var lframeHeight = lframe.offsetHeight;
    var rframeHeight = rframe.offsetHeight;
    var maxHeight = Math.max(lframeHeight, rframeHeight);

    main.style.height = (maxHeight + 20) + 'px';
}

function hideshowadvsearch(aEvent)
{
	var e = aEvent ? aEvent : window.event;
	var id = document.getElementById(e.target.id);
	var nextSibling = id.nextSibling;
	while (nextSibling && nextSibling.nodeType != 1)
	{
		nextSibling = nextSibling.nextSibling;
	}
	if (nextSibling.style.visibility == "visible")
	{
		nextSibling.style.visibility="hidden";
		nextSibling.style.position="absolute";
	}
	else
	{
		nextSibling.style.visibility="visible";
		nextSibling.style.position="relative";
	}
}
